<!DOCTYPE html>
<link rel="stylesheet" href="/assets/css/admin.css" />
<link rel="stylesheet" href="/assets/css/admin.dark.css" />
<link rel="stylesheet" href="/pear/css/pear.css" />
<style>
    .layui-input-block input {
        width: 300px;
    }
</style>
<div style="padding: 16px;">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-tab layui-tab-brief">
                <ul class="layui-tab-title">
                    <li class="layui-this">基本信息</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <form class="layui-form layui-form-pane" action="" method="post">
                            <div class="layui-form-item">
                                <label class="layui-form-label">网站名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="logo[title]" autocomplete="off" placeholder="请输入"
                                        lay-verify="required" class="layui-input" value="{$logo.title}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">网站logo</label>
                                <div class="layui-input-group">
                                    <input type="text" name="logo[image]" autocomplete="off" placeholder="请输入"
                                        lay-verify="required" class="layui-input" value="{$logo.image}">
                                    <div class="layui-input-suffix">
                                        <img src="{$logo.image}" data-title="网站logo" class="image" />
                                    </div>
                                    <div class="layui-input-suffix uploads">
                                        <a href="javascript:;" class="layui-btn ">
                                            <i class="layui-icon layui-icon-upload"></i>上传
                                        </a>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button type="submit" class="layui-btn layui-btn-md" lay-submit
                                        lay-filter="form-submit">
                                        提交
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/layui/layui.js"></script>
<script src="/pear/pear.js"></script>
<script>
    layui.use(['common', 'jquery', 'form'], function () {
        let $ = layui.$;
        let form = layui.form;
        let common = layui.common;

        // 查看文件
        common.openFiles(".image");
        // 附件上传
        $(".uploads").on("click", function () {
            common.openAssets(this, `{:route('admin.attachment.query')}`);
        })
    })
</script>